﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Jobs/Jobs.master" AutoEventWireup="true" CodeBehind="JobLists.aspx.cs" Inherits="HRdex_Final.Jobs.WebForm2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
   
    <div Align="center">
    <asp:GridView ID="gvJobList" runat="server" AutoGenerateColumns="False" 
        DataKeyNames="JobID" DataSourceID="jobList" BackColor="White" 
           BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="3" 
           Width="699px" AllowSorting="True">
        <Columns>
 <asp:TemplateField>
<ItemTemplate> 
<asp:HyperLink ID="lnkSelect" runat='server' NavigateUrl='<%# String.Format("~/Jobs/JobForm.aspx?JobID={0}", Eval("JobID")) %>'>Select</asp:HyperLink> 
</ItemTemplate> 
</asp:TemplateField>
            <asp:BoundField DataField="JobID" HeaderText="JobID" InsertVisible="False" 
                ReadOnly="True" SortExpression="JobID" Visible="False" />
            <asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" />
            <asp:BoundField DataField="Description" HeaderText="Description" 
                SortExpression="Description" />
            <asp:BoundField DataField="Skills" HeaderText="Skills" 
                SortExpression="Skills" />
            <asp:BoundField DataField="DatePosted" HeaderText="DatePosted" 
                SortExpression="DatePosted" />
            <asp:BoundField DataField="JobType" HeaderText="JobType" 
                SortExpression="JobType" />
            <asp:BoundField DataField="Name" HeaderText="Name" 
                SortExpression="Name" ReadOnly="True" />
        </Columns>
        <FooterStyle BackColor="White" ForeColor="#000066" />
        <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
        <RowStyle ForeColor="#000066" />
        <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
        <SortedAscendingCellStyle BackColor="#F1F1F1" />
        <SortedAscendingHeaderStyle BackColor="#007DBB" />
        <SortedDescendingCellStyle BackColor="#CAC9C9" />
        <SortedDescendingHeaderStyle BackColor="#00547E" />
    </asp:GridView>
    <asp:SqlDataSource ID="jobList" runat="server" 
        ConnectionString="<%$ ConnectionStrings:HRmainConnectionString %>" 
        
        SelectCommand="SELECT catJobTitle.JobID, catJobTitle.Title, catJobTitle.Description, catJobTitle.Skills, catJobTitle.DatePosted, catJobTitle.JobType, formEmployees.LastName + ', ' + formEmployees.FirstName + ' ' + formEmployees.MiddleName AS Name, catJobTitle.attachment FROM catJobTitle INNER JOIN formEmployees ON catJobTitle.EmployeesID = formEmployees.EmployeeID ORDER BY TITLE"></asp:SqlDataSource>

</div>
</asp:Content>
